test: add shared jest tests for demo apps#313
Open
alpharius-ck wants to merge 5 commits intomainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a shared Jest-based test suite that can be executed across the demo apps in apps/, and wires up each app’s Jest configuration to run those shared suites. It also updates Turbo/task wiring and docs to support running app tests from the repo root.
Changes:
- Added a new
apps/brownfield-example-shared-testsworkspace exporting reusable Jest suites + shared Jest setup/mocks. - Added Jest configs/setup and new shared-suite test entrypoints for
RNApp,ExpoApp54, andExpoApp55(plustest:appsturbo script and CONTRIBUTING docs). - Adjusted Turbo dependencies (
build:brownfield) and package scripts to ensure needed builds happen before lint/typecheck.
Reviewed changes
Copilot reviewed 30 out of 32 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Adds Jest + testing-library deps required by the example apps/shared test workspace. |
| turbo.json | Makes lint/typecheck depend on build:brownfield (including upstream deps). |
| packages/cli/turbo.json | Defines a build:brownfield turbo task for the CLI dist output. |
| packages/cli/package.json | Adds build:brownfield script and tweaks build behavior. |
| packages/brownie/package.json | Adds build:brownfield script alias. |
| package.json | Adds test:apps root script to run tests for apps/* via Turbo. |
| CONTRIBUTING.md | Documents the new app testing commands and shared-test setup. |
| apps/RNApp/package.json | Points test to the app’s Jest config and adds shared test deps. |
| apps/RNApp/jest.setup.js | Loads shared Jest setup from the shared-tests workspace. |
| apps/RNApp/jest.config.js | Adds Jest config for monorepo source mapping + shared-tests transforms. |
| apps/RNApp/tests/brownfield.example.test.tsx | Runs the shared suites against RNApp components. |
| apps/RNApp/tests/App.test.tsx | Updates App import path to src/App. |
| apps/ExpoApp55/package.json | Adds Jest/test deps and a test script; disables expo lint cache. |
| apps/ExpoApp55/jest/cssMock.js | Stubs CSS imports for Jest. |
| apps/ExpoApp55/jest.setup.js | Loads shared Jest setup from the shared-tests workspace. |
| apps/ExpoApp55/jest.config.js | Adds Jest config for Expo 55, monorepo source mapping, and aliasing. |
| apps/ExpoApp55/eslint.config.js | Adds Node globals for jest.config.js linting. |
| apps/ExpoApp55/tests/brownfield.example.test.tsx | Runs the shared suites against ExpoApp55 components. |
| apps/ExpoApp54/package.json | Adds Jest/test deps and a test script; disables expo lint cache. |
| apps/ExpoApp54/jest.setup.js | Loads shared Jest setup from the shared-tests workspace. |
| apps/ExpoApp54/jest.config.js | Adds Jest config for Expo 54, monorepo source mapping, and aliasing. |
| apps/ExpoApp54/tests/brownfield.example.test.tsx | Runs the shared suites against ExpoApp54 components. |
| apps/brownfield-example-shared-tests/** | New workspace containing shared Jest suites, types, and setup/mocks. |
| .changeset/orange-dancers-fry.md | Declares version bumps associated with adding Jest unit tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#11
Test plan